# encoding:utf8

from flask_script import Manager
from FlaskMigrate import app
from flask_migrate import Migrate, MigrateCommand
from exts import db

# 0.导入需要迁移的模型
from models import Article

manager = Manager(app)

# 1.要使用flask-migrate,必须绑定app和db
migrate = Migrate(app, db)

# 2.把MigrateCommand命令添加到manager中
manager.add_command('db', MigrateCommand)

if __name__ == '__main__':
    manager.run()
